/**
 * 
 */
package com.pxingg.log;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * @author pxingg
 * 
 */
public class LogConfigTest
{
    /**
     * The log of this class
     */
    static Log log = LogFactory.getLog(LogConfigTest.class);

    /**
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @AfterClass
    public static void tearDownAfterClass() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @After
    public void tearDown() throws Exception
    {
    }

    @Test
    public final void test()
    {
        LogConfig.init();
        LogConfigTest.log.error("");
        LogConfigTest.log.info("here is the info log");
        LogConfigTest.log.debug("here is the debug log");
        LogConfigTest.log.trace("here is the trace log");

        LogConfig.setLevelINFO();
        LogConfigTest.log.info("here is the info log2");
        LogConfigTest.log.debug("here is the debug log2");
        LogConfigTest.log.debug("here is the trace log2");

        LogConfig.setLevelTRACE();
        LogConfigTest.log.info("here is the info log3");
        LogConfigTest.log.debug("here is the debug log3");
        LogConfigTest.log.debug("here is the trace log3");
    }
}
